<?php

namespace App\Enums;

use Filament\Support\Contracts\HasColor;
use Filament\Support\Contracts\HasIcon;
use Filament\Support\Contracts\HasLabel;

enum BookStatus: int implements HasLabel,HasColor,HasIcon
{
    case STATUS_DISABLE = 0;
    case STATUS_NORMAL = 1;


    public function getLabel(): string
    {
        return match ($this) {
            self::STATUS_DISABLE => '已下架',
            self::STATUS_NORMAL => '上架中',

        };
    }
    public function getColor(): string
    {
        return match ($this) {
            self::STATUS_DISABLE => 'danger',
            self::STATUS_NORMAL => 'success',

        };
    }

    public function getIcon(): string
    {
        return match ($this) {
            self::STATUS_DISABLE => 'heroicon-o-x-mark',
            self::STATUS_NORMAL => 'heroicon-o-check',

        };
    }

}
